<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<body>
<h2>Hello World!</h2>
<%

    String username = (String) session.getAttribute("username");
    Boolean status = (Boolean) session.getAttribute("status");
    if(status !=null && status.booleanValue()){
        String role = "普通的角色";
        if("admin".equals(username)){
            role ="管理员的角色";
        }
%>

<h1>已登录： <%=username%>       <%=role%></h1>

<%
    }else{
%>
<h1>未登录</h1>

<%   }%>
</body>
</html>
